home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / workbench werkzeuge / scherz programme / clicker / source / prefs.h < prev    next >
C/C++ Source or Header  |  1996-04-07  |  2KB  |  54 lines

  1. /*  File:         prefs.h
  2.  *  Created:      20-10-95
  3.  *  Updated:      30-12-95
  4.  *  Version:      1.0
  5.  *  Project:      Clicker
  6.  *  Owner:        Jeroen Vermeulen
  7.  *  Requirements: KickStart V39+
  8.  *  Legal:        PD
  9.  *  Status:       Release
  10.  */
  11.  
  12. /* Defining this preprocessor symbol will disable all mouse-click code.  There
  13.  * is no real reason for this except that it may help get a few instructions out
  14.  * of the critical path of the input stream.  Clicker sniffs at any input event
  15.  * that comes in, including mouse moves, so the faster it is done the better.
  16.  *
  17.  * If mouse-clicks are disabled at compile time, the gadget for it in the prefs
  18.  * window will be ghosted.
  19.  */
  20. /* #define NOCLICKMOUSE */
  21.  
  22.  
  23. struct SoundSettings
  24. {
  25.   /* Alter this value at will.  There's no need to notify through `newsettings'.
  26.    */
  27.   BOOL  ClickMouse;
  28.  
  29.   /* Change pitch/length/volume of click by poking new values into this struct,
  30.    * and setting newsettings to TRUE afterwards to notify the click routine.
  31.    */
  32.   BOOL  newsettings;
  33.   UWORD period, volume, cycles;
  34.  
  35. };
  36.  
  37.  
  38. /* This global volatile variable enables asynchronous communication between
  39.  * processes.  New settings for sample volume, click length and pitch will be
  40.  * stored into this struct, so the key-click routine will feed the new data into
  41.  * its audio request on the next key click.
  42.  */
  43. extern volatile struct SoundSettings ClickPrefs;
  44.  
  45.  
  46. /* CopySoundPrefs():
  47.  * Copies a SoundSettings structure, like CopyMem() but slightly safer in every-
  48.  * day use.  It is volatile-safe and const-friendly, and also sets the
  49.  * destination's newsettings flag.  NULL arguments are *not* safe.
  50.  */
  51. void CopySoundPrefs(volatile const struct SoundSettings *const src,
  52.                     volatile       struct SoundSettings *const dst);
  53.  
  54.